home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW Related / DTS MPW Goodies / OpenCheckedOut < prev    next >
Encoding:
Text File  |  1990-09-14  |  1.5 KB  |  64 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        OpenCheckedOut
  3. #
  4. #    Contains:    script to open all checked-out files from all projects
  5. #
  6. #    Usage:        OpenCheckedOut
  7. #
  8. #                OpenCheckedOut opens all the files in each CheckOutDir that
  9. #                are currently checked out for modification.
  10. #
  11. #    Written by:    Darin Adler and scott douglass
  12. #
  13. #    Copyright:    © 1988, 1989 by Apple Computer, Inc., all rights reserved.
  14. #
  15. #    Change History:
  16. #
  17. #        12/6/89        sad        use CheckedOutFiles
  18. #        11/9/89        dba        twiddle relentlessly
  19. #        11/8/89        dba        change != to ≠
  20. #        5/26/89        sad        change ProjectInfo output parsing
  21. #        2/17/89        sad        use ProjectInfo -s; redirect to {somewhere}
  22. #        11/17/88    sad        replace ∑ Dev:Null at end
  23. #        11/17/88    sad        finish Can’t parse logic, was accidentally checked in
  24. #        11/17/88    sad        fix for “:” as checkout dir
  25. #
  26. #    To Do:
  27. #
  28.  
  29. Set Exit 0
  30.  
  31. # the following helps to debug until MPW sends echos to Dev:Console instead of Dev:StdErr
  32.  
  33. If {Echo}
  34.     Set somewhere "∑∑ '{Worksheet}'"
  35. Else
  36.     Set somewhere "∑ Dev:Null"
  37. End
  38.  
  39.  
  40. Set FirstNotOpened ""
  41. Set OthersNotOpened ""
  42.  
  43. Begin
  44.     For File In `CheckedOutFiles -m`
  45.         Open "{File}" ∑∑ "{Worksheet}"
  46.         If {Status}
  47.             If "{FirstNotOpened}" == ""
  48.                 Set FirstNotOpened "“{File}”"
  49.             Else
  50.                 Set OthersNotOpened "{OthersNotOpened}, “{File}”"
  51.             End
  52.         End
  53.     End
  54.  
  55.     If "{FirstNotOpened}" ≠ ""
  56.         If "{OthersNotOpened}" == ""
  57.             Alert "{FirstNotOpened} is checked out from “{Project}” but is not in the check out directory."
  58.         Else
  59.             Alert "The following files are checked out from “{Project}” but are not in the check out directory: {FirstNotOpened}{OthersNotOpened}."
  60.         End
  61.     End
  62.  
  63. End {somewhere}
  64.